package six;

import java.util.Scanner;

public class LinearEquation {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int a=input.nextInt();
        int b=input.nextInt();
        int c=input.nextInt();
        int d=input.nextInt();
        int e= input.nextInt();
        int f= input.nextInt();
        LinearEquation L = new LinearEquation(a,b,c,d,e,f);
        if(L.isSolvable()){
            System.out.println(L.getX()+" "+L.getY());
        }
        else{
            System.out.println("The equation has no root");
        }

    }
    int a,b,c,d,e,f;
    LinearEquation(int a,int b,int c,int d,int e,int f){
        this.a=a;
        this.b=b;
        this.c=c;
        this.d=d;
        this.e=e;
        this.f=f;

    }
    int getA(){
        return a;
    }

    public int getB() {
        return b;
    }

    public int getC() {
        return c;
    }

    public int getD() {
        return d;
    }

    public int getE() {
        return e;
    }

    public int getF() {
        return f;
    }
    public boolean isSolvable(){
        return a*d - b*c != 0;

    }
    public double getX(){
        return (e*d-b*f)/(a*d-b*c);

    }
    public  double getY(){
        return (a*f-e*c)/(a*d-b*c);
    }
}
